import { useResponseSuccess } from '~/utils/response';

export default eventHandler(async (event) => {
  const templateId = getRouterParam(event, 'id');
  const versionId = getRouterParam(event, 'versionId');

  // 模拟版本回滚
  return useResponseSuccess({
    message: '版本回滚成功',
    data: {
      templateId,
      versionId,
      rollbackTime: new Date().toISOString().replace('T', ' ').slice(0, 19),
    },
  });
});
